module.exports = options =>{
    return async function adminauth(ctx,next){
        const ID = ctx.cookies.get("ID", {
            encrypt: true,
          })
         
        if(ctx.session.LoginId==ID){
            await next()
        }else{
            ctx.body={data:'违规操作：未登录'}
        }
    }
}